<article class="page-container">
	<form class="layui-form" action="">
	  <div class="layui-form-item">
	    <label class="layui-form-label">昵称</label>
	    <div class="layui-input-block">
	      <input type="text" class="layui-input" value="<{$userinfo['username']}>" disabled='disabled'>
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">头像</label>
	    <div class="layui-input-block">
			<input type="file" name="file" lay-type="file" lay-title="请上传头像" _url="<{:url('c/up','dir=attach&f=avatar')}>" onclick="c_up(this)">
			<span _span="avatar">
			<{if $info['avatar']}>
				<{if com_check_type($info['avatar'])}>
					<img src="\<{$info['avatar']}>" height=50 />
				<{else}>
					<{$info['avatar']}>
				<{/if}>
				<input type='checkbox' name='del_avatar' value='1' title='删除' />
			<{/if}>
			</span>
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">姓名</label>
	    <div class="layui-input-block">
	      <input type="text" name="name" lay-verify="required" class="layui-input" placeholder="请填写姓名" value="<{$info['name']}>">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">电话</label>
	    <div class="layui-input-block">
	      <input type="text" name="phone" class="layui-input" placeholder="请填写电话 可不填 " value="<{$info['phone']}>">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">邮箱</label>
	    <div class="layui-input-block">
	      <input type="text" name="email" class="layui-input" placeholder="请填写邮箱 可不填 " value="<{$info['email']}>">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">修改密码</label>
	    <div class="layui-input-block">
	      <input type="password" name="password" class="layui-input" placeholder="修改密码  不填写则为不修改" value="">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">确认密码</label>
	    <div class="layui-input-block">
	      <input type="password" lay-verify="equalto" class="layui-input" placeholder="请再次确认修改密码" value="">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <div class="layui-input-block">
	      <button class="layui-btn" lay-submit="" lay-filter="form">提交</button>
	    </div>
	  </div>
	</form>
</article>
<script>
$().ready(function(){
	form.verify({
		equalto: function(value) { 
	        if($("[name='password']").val()!='' && $("[name='password']").val()!=value){
	        	return '密码不一致';
	        }
	    },
	});	
});
</script>